from unicodedata import name
import pandas as pd
# 把你发的xlsx的type取有用字段转为csv
types = pd.read_excel('types.xlsx', usecols=['SUBTYP_CATEGORY唯一值', '中类']).dropna(
    axis="index", subset=['中类'])
types_tmp = types['SUBTYP_CATEGORY唯一值'].str.split('_', expand=True)
types_tmp.columns = ["SUBTYPE", "CATEGORY"]
pd.concat([types.drop(columns=["SUBTYP_CATEGORY唯一值"]), types_tmp], axis="columns").to_csv(
    "res_types.csv", index=False)
